home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / athena / moira / manual.txt < prev    next >
Encoding:
Text File  |  1991-01-31  |  88.3 KB  |  1,859 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                                                     M. I. T.   PROJECT   ATHENA
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.                                                             Moira User's Manual
  25.  
  26.  
  27.  
  28.  
  29.                                                                 Mark Rosenstein
  30.                                                        1 February 1991 at 16:31
  31.                                                     M. I. T.   PROJECT   ATHENA
  32.  
  33.  
  34.  
  35.                                                             Moira User's Manual
  36.  
  37.                                                                 Mark Rosenstein
  38.                                                        1 February 1991 at 16:31
  39.  
  40.  
  41.  
  42.  
  43. This is a user's and operator's manual for moira.  It is primarily targeted for
  44. administrators who use moira to manage  a  distributed  computing  environment,
  45. although  there  are  sections of interest to regular users as well.  There are
  46. separate manuals to describe compiling the system, making local  modifications,
  47. and the design decisions behind it.
  48.  
  49. This  manual  attempts  to  document  both  what  moira  is  capable of and the
  50. conventions that we use here at Project  Athena.    Sections  describing  these
  51. conventions  are  marked  with a [Athena] symbol and may be done differently at
  52. other sites.
  53.  
  54.  
  55.  
  56. 1. Moira Overview
  57. Moira is the  Project  Athena  Service  Management  System.    It  manages  the
  58. configuration  of  all  of the Athena network services.  It consists of a large
  59. relational  database,  and  front  end  software  to  control  access  to  that
  60. information and automatically update system servers from that information.
  61.  
  62. Moira  was  developed  at  MIT's Project Athena, and has been in daily use here
  63. since 1988.  It is available with the following restrictions:
  64.  
  65.       (c) Copyright 1987, 1988, 1989, 1990 by the  Massachusetts  Institute
  66.     of Technology
  67.  
  68.       Permission to use, copy, modify, and distribute this software and its
  69.     documentation for any  purpose  and  without  fee  is  hereby  granted,
  70.     provided  that the above copyright notice appear in all copies and that
  71.     both that  copyright  notice  and  this  permission  notice  appear  in
  72.     supporting  documentation,  and  that the name of M.I.T. not be used in
  73.     advertising or publicity pertaining to  distribution  of  the  software
  74.     without   specific,   written   prior  permission.    M.I.T.  makes  no
  75.     representations about the suitability of this software for any purpose.
  76.     It is provided ``as is'' without express or implied warranty.
  77.  
  78.       Project  Athena,  Athena,  Athena  MUSE,  Discuss,  Hesiod, Kerberos,
  79.     Moira, and Zephyr are trademarks  of  the  Massachusetts  Institute  of
  80.     Technology  (MIT).    No commercial use of these trademarks may be made
  81.     without prior written permission of MIT.
  82.  
  83. Moira depends on the Kerberos authentication system, and will make use  of  the
  84. Hesiod nameservice and Zephyr notification services if they are present in your
  85. system.
  86.  
  87. There are a number of client programs  available,  which  can  be  run  on  any
  88. workstation.  These include
  89.  
  90.    - moira (listmaint, usermaint, and dcmmaint are part of this)
  91.    - mrcheck
  92.    - mrtest
  93.    - blanche
  94.    - chfn
  95.    - chpobox
  96.    - mailmaint
  97.  
  98. The  text  in this document assumes that you are using the moira client program
  99. unless otherwise indicated.  References are also made at various points to  the
  100. actual  moira queries.  These are listed in a separate document, Moira Queries.
  101. Queries may be used with the mrtest program.
  102.  
  103. Moira can be used by everyone  on  the  system,  but  some  operations  require
  104. specific  privileges.    Different  parts of moira are of interest to different
  105. users.  Regular users will probably not be aware of what moira is, yet will use
  106. it  when  they  run chfn or mailmaint.  More experienced users may do more list
  107. manipulation, using listmaint and blanche.  Only users with privileges will  be
  108. able to use much more than that.
  109.  
  110. [Athena]  Here,  we have three kinds of advanced moira users: the user accounts
  111. consultants, the operations staff, and the moira manager.   The  user  accounts
  112. consultants  handle problems and questions from users about their accounts, and
  113. are the people who do most of the manipulation of  accounts  and  lists.    The
  114. operations  staff  handle  configuration  of  machines, clusters, printers, and
  115. fileservers.  Finally, there is one  person  designated  as  the  moira  system
  116. manager  who  sees that the system runs smoothly and has occasional maintenance
  117. to do.
  118.  
  119. 1.1. Moira Objects
  120. There are  several  kinds  of  first-class  objects  in  moira:  users,  lists,
  121. machines,  clusters, and filesystems.  Other objects in the database are not as
  122. flexible.  These first-class objects share some characteristics.
  123.  
  124. Each of these objects has a name, and while all  names  of  a  given  type  are
  125. unique  (for  example:  no  two  users have the same login name), two different
  126. kinds of object may have the same name (a user may have  the  same  name  as  a
  127. list).    Names  must  consist of printable characters excluding double quotes,
  128. asterisk, question mark, backslash, and square brackets ( " * ? \ [ ] ).
  129.  
  130. These objects are often referenced by other objects in  the  database.    These
  131. references  are  done in such a way that if you change a user's login name, all
  132. references to that user will now show the new name.   Beware  that  some  other
  133. objects  in  the  database  do  not  share  this  characteristic: printers, DCM
  134. services, and zephyr ACLs.
  135.  
  136. Both the first-class objects and many other objects in moira  all  record  last
  137. modification  info.   This includes the date and time it was modified, the user
  138. responsible for the modification, and the program that was used.  Some  changes
  139. affect  the  modification  info  on related objects.  For example: changing the
  140. information associated with a cluster will update the cluster modification time
  141. as well.
  142.  
  143.  
  144.  
  145. 2. Regular Users
  146. Regular users only have permission to examine their own account, change some of
  147. their account information, and manipulate public mailing lists and  lists  that
  148. they  own.    There are a few more operations that anyone may perform, but most
  149. users will not find too useful.
  150.  
  151. 2.1. Name, Address, Phone Number
  152. The chfn program is used to set how your full name looks to  other  users,  and
  153. your  address and phone number as seen by finger.  When started, chfn will tell
  154. you when your info was last changed and by whom.  If  you  just  press  return,
  155. chfn  will reuse the old value in that question.  To make an answer empty, type
  156. ``none'' (without the quote marks).  Note that you cannot have a colon ``:'' or
  157. a comma ``,'' in any of your answers.
  158.  
  159. Your full name can be whatever you want it to read.  The operations staff has a
  160. separate record of who you really are, so you cannot  hide  from  them.    Your
  161. address  and  phone  number  will be accessible to people who finger you if you
  162. enter them here.  You can also keep them blank.
  163.  
  164. When you change this information, the changes will not take  effect  until  the
  165. next  update.  [Athena] This will happen by the next morning at the latest.  If
  166. you are a system administrator, you can change other people's  finger  info  by
  167. running  ``chfn  username''.    Chfn  uses  the queries get_finger_by_login and
  168. update_finger_by_login.
  169.  
  170. 2.2. Receiving Mail
  171. [Athena] Most people receive their email in a post office box, or pobox,  which
  172. refers to a special server machine that Athena uses.  If you want email sent to
  173. your account to go somewhere else, you can use the chpobox  program  to  change
  174. this.    Note  that at a site using POP servers like Athena, a .forward file in
  175. your home directory will have no effect.
  176.  
  177. To see your current pobox, type
  178.  
  179.     chpobox
  180.  
  181. To forward your mail to to another site, use
  182.  
  183.     chpobox -s user@host.domain
  184.  
  185. To undo the above forwarding and receive your mail locally in  the  same  pobox
  186. you used before, type
  187.  
  188.     chpobox -p
  189.  
  190. Note  that  any  change  requested by chpobox will not take effect for a while,
  191. [Athena] but should be in place by the following morning at the latest.
  192.  
  193. Note that moira will canonicalize the hostname if you request mail  forwarding.
  194. In most cases this is correct, but you may want to override this.  For example,
  195. you may want to forward your mail to ``user@LCS.MIT.EDU'', where LCS.MIT.EDU is
  196. an  alias  for  the machine PTT.LCS.MIT.EDU.  In this case you may not want the
  197. name LCS.MIT.EDU to be canonicalized, since in the future the alias  may  point
  198. somewhere else.  In this case, you could use the command
  199.  
  200.     chpobox -s user@\"lcs.mit.edu\"
  201.  
  202. to  avoid  having  the  hostname  canonicalized.    Only  the double-quotes are
  203. necessary for the chpobox program; the backslashes are there to get the  quotes
  204. past the shell.
  205.  
  206. Sometimes  a  user  really wants mail to go more than one place without using a
  207. mailing list.  This is not recommended, but can be done by setting the pobox to
  208. an external address which is actually a comma separated list, like this:
  209.  
  210.     chpobox -s "user@host.domain, user@another.host.domain"
  211.  
  212. [Athena]  Note  that  if  one of the destinations is a regular pobox, it is not
  213. acceptable to use ``user@ATHENA.MIT.EDU'', you must instead use an address like
  214. ``user@ATHENA-PO-1.LOCAL''  when  specifying  multiple  poboxes.  The user will
  215. also have to set the environment variable MAILHOST to the  name  of  their  POP
  216. server  if  they do this, since moira no longer recognizes that they have a POP
  217. box.
  218.  
  219. Each of the above commands also takes an additional  argument  ``-u  username''
  220. that  an administrator can use to modify someone else's mail forwarding.  There
  221. is also a menu choice in the moira  program  for  manipulating  poboxes.    The
  222. queries  pertaining  to  poboxes  are  get_pobox, set_pobox, set_pobox_pop, and
  223. delete_pobox.
  224.  
  225. 2.3. Mailing Lists
  226. This section gives a brief description of  manipulating  lists.    For  a  more
  227. complete  treatment  of  creating lists, their attributes, and other options on
  228. them see section 3.2.
  229.  
  230. Any user may add or delete their own usernames from public mailing lists.  This
  231. is easiest done with the mailmaint program.  Mailmaint presents you with a menu
  232. containing the following items:
  233.  
  234.    1. Show all mailing lists.
  235.    2. Get all members of a mailing list.
  236.    3. Display lists of which you are a member.
  237.    4. Show description of list.
  238.    5. Add yourself to a mailing list.
  239.    6. Delete yourself from a mailing list.
  240.  
  241. The first choice will list all of the public mailing  lists,  but  not  private
  242. ones.    This may take a while, as there are liable to be many mailing lists to
  243. choose from.
  244.  
  245. Choice two will display all of the members of a list.  You will only be able to
  246. do  this  for  lists  which  are  visible  (i.e.  not hidden) unless you are an
  247. administrator of the list or you have  privileges  within  moira.    Lists  can
  248. contain  several kinds of members.  Those you are most likely to see are users,
  249. which name users of the local system, and  strings,  which  are  external  mail
  250. addresses.  Another list may be a member of a list as well, in which case every
  251. member of that sub-list is also a member of this list.
  252.  
  253. To find out which lists you belong to, you can use choice three.  Note that you
  254. may  be a member of some groups in addition to mailing lists, and these will be
  255. displayed at the same time.  To find out more about any list,  you  can  select
  256. option four.
  257.  
  258. Finally,  choices five and six allow you to put your username on a list or take
  259. yourself off.  Note that you can only do this to lists that are public or  that
  260. you  administer,  so  you may get a ``permission denied'' error.  In this case,
  261. you will have to ask either the administrator of that specific list, or a  user
  262. accounts consultant to make the change.
  263.  
  264.  
  265.  
  266. 2.3.1. For More Sophisticated Users
  267. If  you  manage  a  list, or want to do more than the mailmaint program allows,
  268. there are two other programs that you may find useful.   Listmaint is a section
  269. of  moira,  and  will  allow you to change the attributes of a list, change the
  270. membership of a list (one member at a time), and find  out  more  about  lists.
  271. Blanche  is  a program that is faster for quick checks of a list or making many
  272. membership changes to a list.  See section 3.2.2 for more information.
  273.  
  274.  
  275.  
  276. 3. User Accounts Administrator
  277. [Athena]  The  accounts  administrators  are  primarily  responsible  for  user
  278. accounts, poboxes and mailing lists, and adjusting user quotas.  Quotas will be
  279. covered later along with other aspects of filesystems.
  280.  
  281. 3.1. User Accounts
  282. Moira stores a lot of information about users in its database.  It should  have
  283. information  about  every potential user in your community, whether or not they
  284. actually have an account.  For each user, moira knows:
  285.  
  286. login           Their login name if they have  one.    This  may  be  up  to  8
  287.                 characters  long.    For someone with status 0 or status 4 (not
  288.                 registered or not registerable),  it  is  usually  a  hash-mark
  289.                 followed  by  their  UID  (i.e.  #17822), but the value at this
  290.                 point really doesn't matter.  Moira will not let  two  accounts
  291.                 have  the  same  login  name.    A login name may be set to the
  292.                 string ``create unique login ID'' in which case moira will  set
  293.                 the  login  name  to  something guaranteed to be unique (a hash
  294.                 sign followed by a unique number).
  295.  
  296. UID             Their UNIX user's ID.    These  are  stored  as  16-bit  signed
  297.                 integers.    This may be set to a numeric value, or the UID may
  298.                 also be set to the string ``create unique UID'' in  which  case
  299.                 moira  will assign one automatically that is not already in use
  300.                 within moira.  The software  that  assigns  them  automatically
  301.                 will put them in the range 100-32765.
  302.  
  303. shell           Their  login  shell.   To moira this is just a string, up to 32
  304.                 characters long.  It is used to construct the password entry.
  305.  
  306. name            Their real first, middle, and last names where  they  can't  be
  307.                 changed  by  the  user.    Each part may be up to 16 characters
  308.                 long.
  309.  
  310. status          Their account status.  See the chart on page 2.
  311.  
  312. class           Their class.   To  moira  this  is  just  a  string,  up  to  8
  313.                 characters  long  and  case insensitive.  [Athena] At Athena we
  314.                 use it to store the  reason  this  account  exists.    See  the
  315.                 following table for a list of classes in use at Athena.
  316.  
  317. encrypted ID number
  318.                 This is the user's school or  organization  ID  number,  passed
  319.                 through  a  one-way  encryption.    We  use  the  UNIX password
  320.                 algorithm, using the first and last initials of the user's real
  321.                 name  as  the  salt.    The  code expects the ID number to be 9
  322.                 digits.
  323.  
  324. [Athena] The classes in use at Athena are:
  325.  
  326. 1992, 1993, etc.
  327.                 An  undergraduate,  indicating the expected year of graduation.
  328.                 We will not turn off an account before June  of  the  indicated
  329.                 year.
  330.  
  331. G               A grad student.  They are here for varying lengths of time, and
  332.                 take leaves-of-absences as well.  We  use  the  latest  records
  333.                 from the registrar to determine who is eligible.
  334.  
  335. STAFF           These are just Project Athena staff members.
  336.  
  337. MITS            MIT Staff other than those working for Project Athena.
  338.  
  339. FACULTY         MIT  Faculty  members.    This  includes anyone involved in the
  340.                 teaching of a course who will need access to Athena.
  341.  
  342. PROJECT         Special accounts for use by projects.  We are trying  to  phase
  343.                 these out.
  344.  
  345. SYSTEM          Special accounts for use by system software.  This includes the
  346.                 obvious ones like ``root'', ``daemon'' and ``uucp'',  and  ones
  347.                 needed by software packages like ``rtingres''.
  348.  
  349. FALL90, SPRING91, etc
  350.                 Special students and others needing an account for just a short
  351.                 while.    The  name  lets  us  know  when we can turn off these
  352.                 accounts.
  353.  
  354. GUEST           Guest accounts.
  355.  
  356. TEST            Accounts used for testing either workstations or moira and  the
  357.                 registration  process.    Most  of  these may be deleted at any
  358.                 time.
  359.  
  360. COURSE          Like project accounts, we are trying to phase these out.
  361.  
  362. OTHER           Accounts that don't fall into any other category.
  363.  
  364. Special groups: SIPB, MITES, ESP, CAES, KNIGHT, HST, WHOI, INTERPH
  365.                 These  are organizations that have people who aren't officially
  366.                 part of the MIT community who have Athena accounts.
  367.  
  368. The account status field identifies  if  an  account  is  active,  among  other
  369. things.   [Athena] At Athena, we have two ways an account might be active: as a
  370. full Athena account with access to Athena resources, and simply as  a  user  in
  371. the  campus namespace.  A user of the campus namespace may be on mailing lists,
  372. get mail forwarded through the mailhub, and have  a  kerberos  principal  whose
  373. name  is  unique  among  Athena  login  names,  but may not actually use Athena
  374. workstations.   We use the verb ``register'' to refer to getting a real  Athena
  375. account,  and ``enroll'' to being entered in the campus namespace.  The integer
  376. values in the status field for a user mean:
  377.  
  378. 0 - Registerable
  379.                 This  is  the  way  students,  faculty, and others eligible for
  380.                 accounts are first entered in the database.
  381.  
  382. 1 - Active      This is a completely active, normal account.
  383.  
  384. 2 - Halfway registered
  385.                 This is an intermediate step between states 0 and 1 used by the
  386.                 reg_svr program.
  387.  
  388. 3 - Marked for deletion
  389.                 This account was once active, but has been turned off.  It will
  390.                 really be deleted at some point in the future.  While it is  in
  391.                 this state, no network services will know about it.
  392.  
  393. 4 - Not allowed to register
  394.                 This is how people are added to the database who  are  part  of
  395.                 the community but not eligible for accounts.
  396.  
  397. 5 - Enrolled in campus namespace
  398.                 This is someone who has enrolled in the campus  namespace,  and
  399.                 is still eligible to register for an account as well.
  400.  
  401. 6 - Enrolled, not allowed to register
  402.                 This is someone  who  has  enrolled,  and  is  not  allowed  to
  403.                 register for an account.
  404.  
  405. 7 - Half enrolled in campus namespace
  406.                 This is an intermediate step between states 4 and 6 used by the
  407.                 reg_svr program.
  408.  
  409.  
  410.  
  411. 3.1.1. Looking Up Users
  412. There  are  several  ways  to  look up existing users.  Using the moira client,
  413. users may be retrieved by login name,  real  name,  or  class.    When  looking
  414. someone  up  by  their name, try to enter their entire first name or last name.
  415. If you use wildcards in both parts of their name, the lookup will be much  less
  416. efficient.    Beware  of  doing  a  lookup  by  class, and this may return many
  417. records.  Queries that return more than a couple hundred records can cause  the
  418. server  to  crash.   When using mrtest, it is also possible to lookup a user by
  419. their UID or by their encrypted school ID, using the queries get_user_by_uid or
  420. get_user_by_mitid.
  421.  
  422.  
  423.  
  424. 3.1.2. Adding New Users
  425. When  users  are  added  by  hand, three items are necessary: the person's real
  426. name, their ID number, and their class.  Most of the time, the login name, UID,
  427. shell,  and  status should be allowed to default to ``create unique login ID'',
  428. ``create unique UID'', ``/bin/csh'', and 0 respectively.  The moira client will
  429. also  look  up  the  name  in  the database to see if that user already appears
  430. there.
  431.  
  432. The name must be correct for accountability.  It generally appears  exactly  as
  433. the  person  is  known  by  the  school  administration,  which may be somewhat
  434. different from the way the person likes to print their name.  There is  another
  435. field  where  the  user can specify how they want their name to appear to other
  436. users.
  437.  
  438. Moira is case-sensitive on names.  [Athena]  The  school  administration  sends
  439. them  to  us  in  all uppercase from their mainframes, but in an effort to have
  440. them look better, we apply the following algorithm: the  first  letter  of  the
  441. name  and  any  letter following whitespace or punctuation will be capitalized,
  442. the rest being lowercase.  This works correctly for  names  like  ``O'Connor'',
  443. but  will be wrong for names like ``McIntosh'' or ``van Buren''.  Names entered
  444. by hand should be entered capitalized according to this algorithm or  the  user
  445. will  not  be  able  to  user  the register program.  Moira also strips off any
  446. suffixes like ``Jr'', or ``III''.
  447.  
  448. An ID number must be entered.  If one is made  up,  rather  than  entering  the
  449. correct  ID  number,  then  a  second  entry will be made for this person if we
  450. receive information about them on  a  tape  from  the  registrar  or  personnel
  451. office.    If  this  person is a guest or someone who will not appear on one of
  452. these tapes, make up a number for them.  It must be 9 digits long.
  453.  
  454. The class must be entered correctly to make  it  possible  to  know  when  this
  455. account is no longer needed and may be deleted.  A scheme should be adopted for
  456. how this field is used if it is to be useful.
  457.  
  458.  
  459.  
  460. 3.1.3. Making a User Account
  461. Once a user is in the database, they  may  claim  an  account  by  running  the
  462. register  program,  or  by an administrator registering them using the register
  463. option of the user menu in moira.  Even if an administrator is going to  create
  464. the  account,  we suggest first entering them as above and then registering the
  465. account, rather than entering them as an active account to begin  with.    This
  466. makes  sure  that  no  part of the account is forgotten.  If you are creating a
  467. system account and want to do it by hand, enter the fields as follows.
  468.  
  469. The login name must be unique among all login names known to moira.    The  UID
  470. may  be  left  as ``create unique UID'', or specified as any 16-bit number.  It
  471. may duplicate an existing UID.  The shell should be set to whatever  value  you
  472. want appearing in the /etc/passwd file for the user's shell.  The status may be
  473. immediately set to 1.  This will create an account without a filesystem, pobox,
  474. group list, quota, or kerberos principal.
  475.  
  476. If  a  user account is owned by someone who often works in a different kerberos
  477. realm, it is possible to store kerberos mappings in moira  so  that  a  foreign
  478. kerberos  principal  (or  another  instance  in  the  local realm) may have the
  479. privileges of a user in moira.  This is done in  the  krbmap  sub-menu.    Each
  480. kerberos principal must map to exactly one user.  The principal is specified in
  481. a case-sensitive string like ``user.instance@REALM'' or ``user@REALM''  if  the
  482. instance is null.  Note that any periods in the username or at-signs before the
  483. realm name must be escaped by a backslash.
  484.  
  485.  
  486.  
  487. 3.1.4. Changing User Information
  488. Any of the user information may be changed.  If the login name is changed,  the
  489. new  name  must be unique among all login names known to moira.  All references
  490. to that user within moira will now refer to the new login name.  However, it is
  491. still  necessary  to change the filesystem name and group name to change all of
  492. the information associated with the user.
  493.  
  494. The class field will be automatically changed  by  the  programs  that  process
  495. tapes  of  information  from the registrar and personnel offices if that user's
  496. status with the school changes.
  497.  
  498.  
  499.  
  500. 3.1.5. Removing Users
  501. In general, users are only deactivated by changing their status to 3.  They are
  502. not  actually  deleted  in the course of day-to-day maintenance by the accounts
  503. consultants.  These deletions occur in batch once or twice a year, see page  7.
  504. In  fact,  the  moira  client  will refuse to delete any account that is not in
  505. status 0.
  506.  
  507. If you really do want to delete a record of a user account, you may do so if it
  508. has  never been registered (i.e. still in state 0) or if you first change it to
  509. state 0.    Any  quotas  the  user  has  assigned  or  kerberos  mappings  will
  510. automatically  be  deleted.    The user record must not be in use in any of the
  511. following ways:
  512.  
  513.    - must not be a member of any lists
  514.  
  515.    - must not be the owner of any filesystems
  516.  
  517.    - must not be the owner of any lists
  518.  
  519.    - must not be the owner of any services
  520.  
  521.    - must not be on a hostaccess list
  522.  
  523. The moira client will prompt you to delete an existing filesystem with the same
  524. name  as  the user assuming that it is the user's home directory.  It will also
  525. prompt you to delete a list with the same name as  the  user's  group,  and  to
  526. remove the user from any lists that the user may be a member of.
  527.  
  528. 3.2. Lists
  529. Lists in moira serve three purposes: they can be mailing lists, UNIX groups, or
  530. access control lists.  Any list can have any combination of these uses.   Lists
  531. may   contain   users,  other  lists,  character  strings  (i.e.  foreign  mail
  532. addresses), or kerberos principals.  When a list contains another list,  it  is
  533. as  though  all  of  the members of the sub-list are also members of the parent
  534. list, and this is handled recursively for as many levels as necessary.    There
  535. is  a  limit  within  the  current  implementation of the server where the tree
  536. structure used to compute intermediate list memberships cannot have  more  than
  537. 1000  entries, but this is a constant that can be raised by recompiling and has
  538. not proven to be a problem in practice.
  539.  
  540. We somewhat haphazardly use the terms list administrator, list owner, list ACL,
  541. and  list  ACE to all mean the same thing.  The correct term is ACE  for Access
  542. Control Entity, although administrator is preferred for readability.
  543.  
  544. Lists have the following attributes:
  545.  
  546. name            This can be up to 32 characters.  To avoid mail  problems  with
  547.                 the  names  of mailing lists we recommend that the names be all
  548.                 lowercase and do not start with a numeral or contain spaces  or
  549.                 other  punctuation  characters  such as comma, period, at-sign,
  550.                 semicolon, parenthesis, or angle brackets ( , . @ ; ( ) < >  ).
  551.                 List names must also be unique within the moira database.
  552.  
  553. active/inactive This  is  a flag indicating whether this list should be present
  554.                 in updates to the  system  services.    When  a  list  is  made
  555.                 inactive,  it is as though it does not exist, except that it is
  556.                 easy to reinstate by just toggling this flag again.    This  is
  557.                 how  we  make groups disappear that belong to accounts that are
  558.                 marked for deletion.
  559.  
  560. public/private  This flag indicates if a list is public,  meaning  than  anyone
  561.                 can add their own username to the list or delete their username
  562.                 from it.  On the other hand, if  a  list  is  private  only  an
  563.                 administrator  of  the list or a moira administrator can change
  564.                 it.
  565.  
  566. visible/hidden  This flag indicates if a list is visible, in which case  anyone
  567.                 can  see  the  list  attributes and membership.  When a list is
  568.                 hidden, moira will only let the  list  administrator  or  moira
  569.                 administrator see the list attributes or membership.  Note that
  570.                 even if a list is hidden, the mailhub will tell people the list
  571.                 membership.
  572.  
  573. maillist        This is a flag that indicates if this list should be treated as
  574.                 a mailing list and downloaded to the mailhub.  Some  lists  may
  575.                 appear  on  the  mailhub  that  are  not specifically marked as
  576.                 maillists, since any list that is itself a  member  of  another
  577.                 list  which is a maillist will be treated as a maillist.  Also,
  578.                 if a list is an administrator of a maillist, it will be treated
  579.                 as a maillist (so that mailer errors pertaining to the list can
  580.                 be sent to the administrators).
  581.  
  582. group and GID   Group is a flag indicating if this list should be treated as  a
  583.                 UNIX group or not.  If group is true, then GID must be a unique
  584.                 16-bit number.  The GID may be entered as a number, , or set to
  585.                 the  string  ``create  unique  GID''  in  which case moira will
  586.                 assign one automatically that is not already in use within  the
  587.                 database.    The  software that assigns them automatically will
  588.                 put them in the range 100-32765.
  589.  
  590. description     This is a simple description of the list, and may be up to  255
  591.                 characters long and may contain whatever you want.
  592.  
  593. ACE             ACE  stands  for Access Control Entity.  This is like an access
  594.                 control list, except that it is not necessarily  a  list.    It
  595.                 consists  of two parts: a type, and a name.  The type is one of
  596.                 USER, LIST, KERBEROS, or NONE.  If the type is USER,  the  name
  597.                 is  a login name known to moira.  If the type is LIST, the name
  598.                 is a list name known to  moira,  and  may  be  self-referential
  599.                 (i.e.  the  list  is  its  own administrator).   If the type is
  600.                 KERBEROS,  the  name  is  a   kerberos   principal   which   is
  601.                 case-sensitive   in   the   form   ``user.instance@REALM''   or
  602.                 ``user@REALM''.  If the type is NONE, then  any  value  may  be
  603.                 passed as the name and it will be ignored.
  604.  
  605.  
  606.  
  607. 3.2.1. Creating & Modifying Lists
  608. Lists  may be created with moira or listmaint.  You will be asked for each item
  609. described above.  If  the  list  is  not  to  be  a  group,  then  the  GID  is
  610. automatically set to ``create unique GID''.
  611.  
  612. [Athena]  When  a  list  is  created  to  contain  just  a  few users to be the
  613. administrator of another list, the convention is to  call  it  list-acl,  where
  614. list  is  the  name  of  the list it will administer.  If this list is to be an
  615. Internet mailing list, you can kill two birds with one  stone  by  calling  the
  616. owning  list list-request, which is the Internet-wide convention for contacting
  617. mailing list  administrators.    If  you  must  create  both  a  list  and  its
  618. administering  list,  remember  to  create  the administering list first, since
  619. moira will not let you specify the name of a  not-yet-created  list  as  owner.
  620. Most  administrator lists are self-administering, so that any administrator can
  621. grant or revoke that privilege to other administrators.
  622.  
  623. The administrators of a list can change any of its attributes except  the  GID,
  624. which can only be changed by moira administrators.
  625.  
  626. A list may be deleted unless it
  627.  
  628.    - has any members
  629.  
  630.    - is itself a member of any lists
  631.  
  632.    - is a filesystem owner
  633.  
  634.    - is in use as a query ACL
  635.  
  636.    - is a list owner
  637.  
  638.    - is a service ACL
  639.  
  640.    - has a group quota
  641.  
  642.    - is a hostaccess ACL
  643.  
  644.    - is a zephyr ACL
  645.  
  646. The  moira  client  will attempt to remove the members of a list and remove the
  647. list as a member of any other lists while deleting a list.  It will display how
  648. else the list is in use if it still cannot delete the list.
  649.  
  650.  
  651.  
  652. 3.2.2. Membership
  653. List  members may be of type USER, LIST, STRING, or KERBEROS.  A member of type
  654. USER is identified by login name, and must be an account known to  moira.    If
  655. the  account's  login  name  is  changed,  this  change  will  automatically be
  656. reflected in the list membership.  If a user is a member of  a  maillist,  then
  657. mail  will be sent to the user's pobox.    A user member of a group simply puts
  658. that user in the group.  A user member of a moira  access  control  list  means
  659. that someone authenticating to that user or a kerberos principal mapped to that
  660. user has the privileges granted by the access control list.
  661.  
  662. A member of type LIST is identified by the list name,  and  must  name  a  list
  663. known  to moira.  If the list's name is changed, this change will automatically
  664. be reflected in the list membership.    When a list is a member of a  maillist,
  665. the  sub-list will also be treated as a maillist and mail sent to that maillist
  666. will also be sent to all members of the sub-list.  When a list is a member of a
  667. group, all members of that sub-list are also members of the group.
  668.  
  669. A  member  of  type  STRING  is  identified by the string itself.   Strings may
  670. contain spaces and other punctuation, but beware of asterisk, question mark and
  671. square  braces  (  *  ? [ ] ) which are special characters within the database.
  672. You may store them normally, but to retrieve based on a string containing those
  673. characters,  you  must  precede  them  by  backslashes to avoid their taking on
  674. pattern-matching meanings.  A string member of a group or access  control  list
  675. is  ignored.    A  string member of a mailing list is assumed to be an external
  676. mail address.
  677.  
  678. A member of type  KERBEROS  is  identified  by  a  text-representation  of  the
  679. principal-instance-realm   triple.      The   principal   is   specified  in  a
  680. case-sensitive string like ``user.instance@REALM''  or  ``user@REALM''  if  the
  681. instance  is  null.    Kerberos  members  of  maillists are ignored.   Kerberos
  682. members of groups are ignored for NFS servers and UNIX groups,  but  propagated
  683. to  the  AFS  protection  database.   KERBEROS members on moira internal access
  684. control lists apply to users who authenticate as that kerberos principal and do
  685. not map to a user.
  686.  
  687. List  membership  may be changed with mailmaint, listmaint (moira), or blanche.
  688. Mailmaint is intended for naive users.  Listmaint is the list menu of moira and
  689. is  the  most complete tool for manipulating lists.  However, it can be tedious
  690. to use listmaint to make a lot of membership changes, in which case blanche  is
  691. a  good choice.  Blanche will allow you to read a list of users from a file and
  692. put them on a list, or take a number of changes from the UNIX command line.
  693.  
  694. 3.3. Mail Forwarding
  695. The user accounts consultants will also have  to  deal  with  mail  forwarding.
  696. Setting poboxes is covered in section 2.2, although the pobox menu of moira may
  697. be used as well.
  698.  
  699. There are two possible problems to note, both of which depend on  bugs/features
  700. of  sendmail  (these  are  in  sendmail version 5.61, but have been there for a
  701. while).  If there is at least one bad address on a mailing list, which includes
  702. putting  a  user on a mailing list who doesn't have a pobox, then sendmail will
  703. just give an error for the entire list without delivering it to anyone.   If  a
  704. user  has  a  pobox  and there is a mailing list with the same name, the user's
  705. pobox will take precedence over the mailing list.  Moira outputs  both  in  the
  706. aliases  file,  and sendmail only pays attention to the latest definition of an
  707. address.
  708.  
  709.  
  710.  
  711. 4. Operations Staff
  712. [Athena]  The  operations  staff  is  responsible  for  workstations,  servers,
  713. managing  disk  space  (with  the  help  of  the  accounts administrators), and
  714. printers.  The following sections cover how moira interacts with these.
  715.  
  716. 4.1. Managing Workstation Information
  717. For each workstation, moira knows the name and type.  The  name  is  the  fully
  718. qualified  domain  name.  For instance, ``ATHENA.MIT.EDU'' is a valid name, but
  719. ``ATHENA'' is not.   Machine names are not  case  sensitive  as  they  are  all
  720. converted  to  uppercase  when the moira server gets them.  Note that the moira
  721. user interface automatically canonicalizes any hostnames typed using the domain
  722. name  system.  If you want to enter a name and not have it canonicalized, enter
  723. the name surrounded by double-quotes (").  Each machine has  a  type  as  well.
  724. These  are  just  strings  to  moira,  although  they are type-checked and case
  725. in-sensitive.  [Athena] We use the types VAX, RT, PMAX, PS2, MAC,  RIOS,  NEXT,
  726. and IBM (mainframes).
  727.  
  728. A  cluster is a grouping of machines with their assigned resources such as file
  729. servers, printers, etc.   Each  cluster  has  a  name,  a  description,  and  a
  730. location.    The  location is actually just an additional description field for
  731. the users' convenience.  [Athena] We use the cluster naming convention
  732.  
  733.     [building name][optional designation]-[architecture]
  734.  
  735. For example, m11-vs, e40test-rt, w20a-vs (the ``a'' designation  because  there
  736. are  multiple  vax  clusters  in  building  W20),  m66priv-rt (this has private
  737. workstations only in it).
  738.  
  739. Each cluster has information associated with it.  Cluster information  consists
  740. of  a  label  and  a  text  string.    [Athena] Labels in use at Athena include
  741. ``syslib'' and a filesystem name for the system pack  containing  OS  binaries,
  742. ``usrlib''  and  a  filesystem  name for a secondary system pack, ``lpr'' and a
  743. printer name to be the default printer for the workstation,  ``zephyr''  and  a
  744. hostname  to specify the preferred zephyr server for the workstation.  [Athena]
  745. The Athena convention for system pack names is that each pack or filesystem has
  746. one  name, and if several clusters in adjacent buildings all use one pack, they
  747. each refer to this pack by its name.  This  is  clearer  than  having  multiple
  748. filesystem names that point to the same actual bits on disk.
  749.  
  750. Each  workstation may be in any number of clusters.  If a workstation is not in
  751. any clusters, it will have no cluster information.  If it is  in  one  cluster,
  752. its info is that cluster's info.  If a workstation is in more than one cluster,
  753. its cluster info is the union of the info for each of the clusters  it  is  in.
  754. This  is  useful as you may have workstations of two different architectures in
  755. one room; the machines of each architecture need different  system  packs,  but
  756. the  same default printer.  You can use 3 clusters: two each identifying system
  757. packs for the two architectures, and one  identifying  the  printer  for  both.
  758. This  is  better  than putting the printer information in with the architecture
  759. specific cluster since there is  only  one  place  to  change  if  the  printer
  760. configuration is changed.
  761.  
  762.  
  763.  
  764. 4.1.1. Adding a New Cluster
  765. When  adding  a  new  cluster,  first check to see that a new cluster is really
  766. needed.  Machines in a new building  that  will  use  existing  fileservers  in
  767. another  building may be put in the other building's cluster, although creating
  768. a separate cluster may be clearer and will be required if a  different  printer
  769. is  needed.    Be  sure to write something informative into the description and
  770. location fields if they are not obvious from the name.
  771.  
  772. Next you will need to add the appropriate information for the cluster.    At  a
  773. minimum  this  would be the syslib information, and may require usrlib as well.
  774. If there is one printer that is obviously closest to machines to be  placed  in
  775. this cluster, then add an lpr entry for the printer as well.
  776.  
  777.  
  778.  
  779. 4.1.2. Adding a Machine
  780. Is  this  really  a new machine, or are you really trying to rename an existing
  781. machine?  If this is a rename, see section 4.1.4.1 below.
  782.  
  783. Determine the machine architecture, and enter the name and type (architecture).
  784. Note  that  if  you type a nickname instead of the primary name of the machine,
  785. moira will substitute the canonical name when it enters it.  Next you will need
  786. to  add  the  machine  to  one  or  more  clusters.   Determine the appropriate
  787. cluster(s) based on location and architecture, and add the machine.
  788.  
  789.  
  790.  
  791. 4.1.3. Changing Cluster Information
  792. The cluster name, location or description can easily be changed.  If  the  name
  793. is changed, it will automatically be updated in the machine to cluster mappings
  794. as well.  The cluster information may be changed by adding or deleting  cluster
  795. information.    It is possible for the same label to appear more than once in a
  796. cluster's info.
  797.  
  798.  
  799.  
  800. 4.1.4. Changing Machine Information
  801. If a workstation is replaced by another of a different architecture,  all  that
  802. is  required is to change the machine type.  If a workstation is moved from one
  803. place to another, it will probably need to be  removed  from  one  cluster  and
  804. added  to  another.    There  are several cases for what to do when the name is
  805. changed.
  806.  
  807.  
  808. 4.1.4.1. Changing the name of a machine
  809. If the change has not yet taken place in the Domain Name System, you can simply
  810. update  the  name  in the database, being sure to type the full domain name for
  811. the new name.  If the DNS has already been changed, and the old name is kept as
  812. a  cname  (nickname)  in  the  DNS,  you  will  have  to  put  the  old name in
  813. double-quotes (") when typing it or the moira client will  canonicalize  it  to
  814. the  new  name before looking it up in the database.  Note that the sequence of
  815. events required so that the workstation remains functional throughout the  name
  816. change are:
  817.  
  818.    1. Change the DNS.
  819.  
  820.    2. Update moira.
  821.  
  822.    3. Change  the name on the workstation itself after it is activated and
  823.       before the next moira update.  If  the  workstation  is  allowed  to
  824.       deactivate  now,  it  will  fail  to  activate  until the next moira
  825.       update.
  826.  
  827.    4. Moira update of Hesiod servers occurs.
  828.  
  829. If the old name is not kept as a nickname in the DNS, then no double-quotes are
  830. necessary  (although  they  can't  hurt)  when  updating  moira,  although  the
  831. workstation may not be entirely functional  between  the  DNS  update  and  the
  832. completion of the rename.
  833.  
  834.  
  835.  
  836. 4.1.5. Deleting a Cluster
  837. You  cannot  delete  a  cluster  if  it has any associated cluster information.
  838. First delete the cluster info, using wildcards for the label.    You  may  then
  839. delete  the  cluster.  If there are any machines still assigned to the cluster,
  840. moira will prompt you to delete them.
  841.  
  842.  
  843.  
  844. 4.1.6. Deleting a Machine
  845. You cannot delete a machine that is in use in  any  way  other  than  having  a
  846. cluster  assignment.   If the machine is in a cluster, moira will prompt you to
  847. remove it.  If the machine is in use in any of these ways:
  848.  
  849.    - has poboxes assigned to it
  850.  
  851.    - receives moira updates
  852.  
  853.    - has any NFS physical partitions
  854.  
  855.    - spools for any printers
  856.  
  857.    - spools for any palladium printers
  858.  
  859.    - is a printer quotaserver
  860.  
  861.    - has filesystems on it
  862.  
  863. you will not be allowed to delete it.
  864.  
  865. 4.2. Managing Filesystem Information
  866. A filesystem in Moira is an abstraction that can refer to an NFS mountpoint, an
  867. RVD  pack,  an  AFS  volume,  an  error  indication, or a combination of these.
  868. Filesystems are often referred to as lockers so that they are not confused with
  869. the partitions that NFS lockers reside on.
  870.  
  871. Moira manages the NFS partitions as well, keeping track of quota allocation and
  872. actually creating the base directory of a locker when necessary.    Moira  also
  873. manages quotas that apply to both NFS and AFS lockers.
  874.  
  875.  
  876.  
  877. 4.2.1. Lockers
  878. Moira has the following fields for each filesystem:
  879.  
  880. name            This  is  a label for the filesystem, up to 32 characters long,
  881.                 same restrictions as list names.  Each filesystem name must  be
  882.                 unique.
  883.  
  884. type            The is the protocol type of the filesystem: AFS, NFS, RVD, ERR,
  885.                 or FSGROUP.
  886.  
  887. machine         This is the server  that  the  filesystem  resides  on.    This
  888.                 machine  must be entered in moira.  This value is only used for
  889.                 NFS and RVD filesystems.
  890.  
  891. packname        The name of the filesystem relative to the server.  For NFS, it
  892.                 is  the path on the server to the root of the locker.  For RVD,
  893.                 it is the pack name.  For AFS, it is the path to  the  root  of
  894.                 the  locker in the AFS cell.  It is ignored for ERR and FSGROUP
  895.                 types.
  896.  
  897. default access  This is the mode that is used  when  the  locker  is  attached.
  898.                 Typical  values  are ``w'' for read/write, ``r'' for read-only,
  899.                 ``n'' for  read-only  without  authentication,  and  ``x''  for
  900.                 exclusive.
  901.  
  902. default mountpoint
  903.                 This is where the locker is attached to the client workstation.
  904.                 [Athena] This is usually /mit/lockername.
  905.  
  906. comments        Any  descriptive  comments  up  to 64 characters.  For type ERR
  907.                 filesystems, this is the error message.
  908.  
  909. ownership       These two fields called ``owner'' and ``owners''  identify  the
  910.                 user  and  group  ownership of the locker.  The owner must be a
  911.                 user known to moira.  The owners group must be a list known  to
  912.                 moira.  When the locker is created, this ownership will be used
  913.                 for the directory.
  914.  
  915. auto create     This flag indicates that moira should  attempt  to  create  the
  916.                 specified  locker.  Once the locker has been created, this flag
  917.                 may be turned off, although moira  will  not  do  that  itself.
  918.                 Clearing the autocreate flag for existing lockers makes the NFS
  919.                 updates run slightly faster.  Note that autocreate is currently
  920.                 only honored for NFS filesystems.
  921.  
  922. locker type     This field indicates what the locker is used for.  This is just
  923.                 a string to moira.  [Athena] Values in use are HOMEDIR for user
  924.                 home  directories, SYSTEM for system software delivery, PROJECT
  925.                 for development project lockers, COURSE for educational  course
  926.                 software,  ACTIVITY for student activities, EXTERN for pointers
  927.                 to filesystems  outside  of  Athena,  and  OTHER  for  whatever
  928.                 doesn't fall into these categories.
  929.  
  930.  
  931.  
  932. 4.2.2. NFS Partitions
  933. Moira  keeps  information about the actual disk partitions that NFS servers put
  934. the NFS lockers on.  For these the following info is kept:
  935.  
  936. machine         This is the host that the partition resides  on,  and  must  be
  937.                 known to moira.
  938.  
  939. device          The   is   the   device   name   for  the  partition,  such  as
  940.                 ``/dev/ra3e''.
  941.  
  942. directory       This is the mountpoint of the partition.  [Athena] We sometimes
  943.                 make this a subdirectory of the partition if we really want all
  944.                 lockers on that partition to be  in  that  subdirectory.    For
  945.                 instance,  on  a  partition  called  ``/u1'' we might store the
  946.                 directory in moira as ``/u1/lockers'' so that all lockers would
  947.                 be created under that point.
  948.  
  949. status          This  field actually bit-encodes two things: the intended usage
  950.                 of the partition and whether group quotas are in  use.    There
  951.                 are  use  bits for: student, faculty, staff, and miscellaneous.
  952.                 These use bits are simply informational except for the  student
  953.                 bit:   this   bit  must  be  set  on  any  partition  that  the
  954.                 registration server will automatically put home directories on.
  955.                 The  group  quotas  bit  indicates  what  kind of quota extract
  956.                 should be done for this partition.
  957.  
  958. allocated       This field contains the total of all of the quotas  of  lockers
  959.                 on  this  partition.    It is automatically maintained by moira
  960.                 when quotas are changed.
  961.  
  962. size            This should be the size of the partition in 1K blocks, although
  963.                 in practice this number is often changed to adjust allocations.
  964.                 The registration server uses this number  to  decide  where  to
  965.                 allocate home directories.
  966.  
  967. NFS  partitions  may  be  created on any machine known to moira, even a machine
  968. which is not receiving NFS updates.   If  it  is  not  receiving  updates,  the
  969. directories  will  not get automatically created and quotas will not get set by
  970. moira.
  971.  
  972.  
  973.  
  974. 4.2.3. Adding a Filesystem
  975. A filesystem may be added by entering the information described  above.    When
  976. creating a filesystem, don't forget to assign any necessary quotas.
  977.  
  978. For  type  NFS  filesystems,  all  of the fields are used.  The machine must be
  979. known to moira.  The packname must exist on a known NFS partition.   The  moira
  980. client  will  prompt  you  to  create the NFS physical partition if it does not
  981. already exist, then retry the addition of the filesystem.  The  ownership  will
  982. be used when creating the directory, if the autocreate flag is set.
  983.  
  984. For  type  RVD filesystems, the only requirements are that the machine the pack
  985. is on must be known to moira.  All fields except ownership and autocreate  will
  986. be  used.  Moira does not actually update RVD servers, so this information only
  987. feeds the nameservice.
  988.  
  989. For type AFS filesystems, the machine field is not used and is usually  set  to
  990. ``[NONE]''  (note  that  backslashes  are needed before the braces when passing
  991. this  string  to  the  server  to  avoid  interpretation  as  pattern  matching
  992. characters).  The ownership and autocreate fields are not used either.
  993.  
  994. For  type  ERR filesystems, only the name, type, and description are used.  The
  995. remainder of the fields will be ignored.  Since often the ERR type is  used  to
  996. temporarily deny access to a filesystem, you can change the type to ERR and the
  997. description to why access is being denied, and  easily  change  it  back  later
  998. without losing the rest of the information.
  999.  
  1000. File  system  groups  are  used to associate several filesystems with one name.
  1001. Usually  these  are  redundant  copies  of  the  same  data  for  the  sake  of
  1002. reliability,  or  because  not  all  clients support all filesystem types.  The
  1003. filesystems that make up the group are sorted in a known order, and attach will
  1004. try them in that order until one is successful.
  1005.  
  1006. In  the  main  entry  for  an FSGROUP, only the name, type, and description are
  1007. used.  Each of the member filesystems must have different names from each other
  1008. and  the  FSGROUP.    [Athena]  A  useful  convention  is  to  have fsgroup foo
  1009. containing foo-primary and foo-secondary if the group  is  for  redundancy,  or
  1010. foo-afs and foo-nfs if the group is for handling multiple protocol types.
  1011.  
  1012. Moira  also  has the concept of filesystem aliases.    An alias just associates
  1013. another name with an existing filesystem.  Because they can be confusing, their
  1014. use  is  discouraged.    [Athena]  We  use  them  primarily for developers' and
  1015. testers' system packs.
  1016.  
  1017.  
  1018.  
  1019. 4.2.4. Changing a Filesystem
  1020. If you change the name of a filesystem, references such as its membership in an
  1021. FSGROUP or quota assignments will follow the new name.
  1022.  
  1023. If  the  change  involves  moving the files, moira will not do all of the work.
  1024. This includes moving from one partition to another, moving from one server type
  1025. to  another, or even just changing the packname on the server.  The easiest way
  1026. to deal with this is to rename the existing filesystem to foo-old, and create a
  1027. new  filesystem  foo  where  you want the files to end up.  Then you can attach
  1028. both filesystems, copy the files, and delete the old files and filesystem entry
  1029. when you are sure the new one is stable.
  1030. For  faster  turnaround  on filesystem moves, you can move the files and update
  1031. moira at the same time, in which case  answers  from  the  nameserver  will  be
  1032. inconsistent with the fileservers until the next moira update.
  1033.  
  1034. When  a filesystem is moved between like servers, the quotas will automatically
  1035. move with it.  If it is moved from an NFS server with user quotas  to  AFS,  an
  1036. AFS  quota will be assigned which is the sum of all of the user quotas assigned
  1037. to the locker.  Note that if it is moved to or from an NFS partition with group
  1038. quotas  that  the quotas will not automatically follow.  Old quotas are left in
  1039. the system, so if a filesystem is later returned, the old quotas will  be  used
  1040. again.
  1041.  
  1042. Access  may  be temporarily denied to a filesystem by changing its type to ERR,
  1043. and putting a helpful message in the description field.  Nothing else needs  to
  1044. be  changed,  so  it  is  easy  to  restore access by restoring the type to its
  1045. previous value.
  1046.  
  1047.  
  1048.  
  1049. 4.2.5. Deleting a Filesystem
  1050. When deleting a filesystem, any quotas assigned to  it  will  automatically  be
  1051. deleted.  Do not forget to actually delete the files on the fileserver as well,
  1052. since moira will not do this for you.
  1053.  
  1054.  
  1055.  
  1056. 4.2.6. Quotas
  1057. Moira keeps track of disk quotas for multiple  types  of  entities  (users  and
  1058. groups)  and  for  multiple types of filesystems (NFS and AFS).  The filesystem
  1059. info is:
  1060.  
  1061. filesystem      Which filesystem this quota applies to.
  1062.  
  1063. type            Type of entity this quotas applies to, currently  USER,  GROUP,
  1064.                 or ANY.
  1065.  
  1066. name            Name  of  entity.  This is a login name for type USER quotas, a
  1067.                 list name for GROUP quotas, and ignored for ANY quotas.
  1068.  
  1069. quota           The quota value in 1K disk blocks.
  1070.  
  1071. If the named filesystem is of type AFS, only quotas of type ANY  will  be  used
  1072. and  others will be ignored.   If the named filesystem is of type NFS, the type
  1073. may be either USER or GROUP.  Moira determines which NFS physical partition the
  1074. filesystem  resides  on,  and  the  flag  in  the NFS physical information will
  1075. indicate if this partition is a user or group quota partition.  Any  quotas  of
  1076. the  wrong  type will be ignored.  Moira will sum up all quotas pertaining to a
  1077. user on a partition and tell the server the total for each partition.
  1078.  
  1079. When filesystems are moved, the quota  information  moves  with  them.    If  a
  1080. filesystem  is  changed from type NFS to type AFS, and a quota of type ANY does
  1081. not exist for that filesystem, moira will create such a  quota  containing  the
  1082. sum of all of the USER quotas on that filesystem.
  1083.  
  1084. 4.3. Managing Printer Information
  1085. Moira manages printcap information as well.  For each printer, moira records:
  1086.  
  1087. name            up to 16 characters long.
  1088.  
  1089. spooling machine
  1090.                 This must name a machine  known  to  moira.    For  the  ``rm''
  1091.                 printcap field.
  1092.  
  1093. spool directory Any  text  string  (up  to  32  characters)  as far as moira is
  1094.                 concerned, it will be put in the ``sd'' printcap field.    This
  1095.                 is typically /usr/spool/printer/name.
  1096.  
  1097. remote printer name
  1098.                 Name of the printer relative to the spooling machine,  for  the
  1099.                 ``rp''  printcap  field.  It is usually the same as the printer
  1100.                 name.
  1101.  
  1102. quota server    This must name a machine known to moira.  This is for an Athena
  1103.                 addition  to  lpr for authenticated printing.  It is put in the
  1104.                 ``rq'' printcap field.
  1105.  
  1106. authorization   This flag indicates if kerberos authorization is  required  for
  1107.                 this printer.  It goes in the ``ka'' printcap field.
  1108.  
  1109. price per page  Price  in  cents per page printed on this printer, to appear in
  1110.                 the ``pc'' printcap field.
  1111.  
  1112. comments        Up to 64 characters of comments
  1113.  
  1114. Since printers are not referred to by other parts of moira, they may be  added,
  1115. changed,  and  deleted  at  will.    Note that moira does not support an atomic
  1116. action to change a printer, so it is possible under some  circumstances  for  a
  1117. printer to accidently be deleted if an error occurs while changing it.
  1118.  
  1119.  
  1120.  
  1121. 5. Moira System Manager
  1122.  
  1123. 5.1. The Server Process
  1124. The heart of Moira is the process moirad.  This must be running for Moira to be
  1125. up and working.
  1126.  
  1127.  
  1128.  
  1129. 5.1.1. Starting Moirad
  1130. If the machine crashed, or you are unsure of the  state  of  the  database,  it
  1131. should be checked before starting the server.  Su to user ``rtingres'', and run
  1132.  
  1133.     /usr/rtingres/bin/restoredb -s -f
  1134.  
  1135. to verify the Ingres database structure.  It is  not  necessary  to  check  the
  1136. Moira database structure too often, but this can be done by running dbck.
  1137.  
  1138. Moirad is normally started using startmoira.    It is not necessary to do this,
  1139. it is a  convenience  program  to  avoid  having  to  always  have  the  proper
  1140. environment  to  start  the  moira server.  Startmoira will connect to the root
  1141. directory, then run moirad capturing the logging information, timestamping  it,
  1142. and writing it to /moira/moira.log.  Because the moirad will grow in size as it
  1143. runs, you may want to do an unlimit at the shell before starting it.
  1144.  
  1145.  
  1146.  
  1147. 5.1.2. Shutting Down the Server
  1148. There are two different ways to shutdown moira.  You can close the database  to
  1149. the server and leave it running, or you can actually bring down the server.
  1150.  
  1151. If you will be doing database maintenance, you can close the database and leave
  1152. the server running.  This way people will get  a  friendly  message  when  they
  1153. attempt  to  access  the  database.    Just create the file /etc/smsdown on the
  1154. server, and the next time the server has no active connections  it  will  close
  1155. the  database.    Thereafter,  if anyone starts a moira client, the contents of
  1156. this file will be displayed as the moira ``message of the day''.  If you  later
  1157. remove  the  file, the next time a client connects to the server it will reopen
  1158. the database.  If you are in a hurry to close or open  the  database,  you  can
  1159. send  it  a  signal  USR1 (i.e. kill -USR1 pid) to make it close as soon as the
  1160. current query is finished processing, or a signal USR2 (i.e. kill -USR2 pid) to
  1161. make it open immediately.  Note that a side effect of closing and reopening the
  1162. database is to flush all cached information such as query access control  lists
  1163. or name to ID mappings.
  1164.  
  1165. To  actually  kill  the server, simply send it a HUP or TERM signal (i.e.  kill
  1166. pid).  It will then exit as soon as the current query finishes processing.   If
  1167. you  want  to  shutdown  more  gracefully,  either  wait  until  no clients are
  1168. connected  to  the  server  (by  monitoring  /moira/moira.log  or   using   the
  1169. _list_users  query)  and  then  kill  the server or first close the database as
  1170. specified above, then kill the server once the database has closed.  Note  that
  1171. the server may not exit right away since it will attempt to finish up any query
  1172. currently being processed and drain the incremental update work queue as well.
  1173.  
  1174. 5.2. Accounts
  1175. There are a number of things the system manager must do to  keep  user  account
  1176. management  running  smoothly.    These  include  loading  new  users  into the
  1177. database, deleting old accounts, and some general cleanup.
  1178.  
  1179.  
  1180.  
  1181. 5.2.1. User Account Tapes
  1182. Much of the general cleanup and maintenance of user accounts is  done  via  the
  1183. students  and  employee  programs.    These  programs  each  process  tapes  of
  1184. information obtained from the registrar and personnel offices.    Operation  of
  1185. each  program  is  the  same,  although the format of the two tapes is slightly
  1186. different.
  1187.  
  1188. The program processes records one at a time.  It takes the  input  records  and
  1189. computes  the encrypted ID number, full name in mixed case, and class.  It then
  1190. uses the encrypted ID as a key to lookup the user.  If the user is not  already
  1191. in  the  database, he is added.  If he is already there, the class, status, and
  1192. address fields are checked and updated if necessary.
  1193.  
  1194. The status field will be set depending on the class.  Students and faculty  are
  1195. eligible  for  accounts  and are created in state 0 (registerable).  Others are
  1196. created in state 4 (not enrolled).
  1197.  
  1198. Whenever a user is touched, either because they  were  found  on  the  tape  or
  1199. because they are added as a new user, these programs set the ugdefault field to
  1200. 1.  This way if these fields are all cleared before loading  tapes,  afterwards
  1201. you  have  a  record  of  who  was on the latest tape.  It is generally safe to
  1202. delete users in states 0 or 4 (unregistered or unenrolled) who are not  on  the
  1203. latest  tapes.  And since these users never touched their entries, there are no
  1204. other references to them in the database to clean up.
  1205.  
  1206. There are several options to these programs that are generally used:  -n causes
  1207. moira  to  fill  in  the  finger information for users who currently have those
  1208. fields blank.  -u causes  an  additional  relation  to  be  maintained  in  the
  1209. database  (called  ``xusers'')   which contains all of the information from the
  1210. tape, including the unencrypted ID number.
  1211.  
  1212.  
  1213.  
  1214. 5.2.2. Register
  1215. There are three components used in registration: the reg_svr daemon running  on
  1216. the  moira  server  machine,  the  userreg  client  program, and a shell script
  1217. necessary to get  userreg  started  correctly  under  different  circumstances.
  1218. [Athena]  For  instance,  one  can  login  for  a  tty-based  session  as  user
  1219. ``register'', password ``athena'' and the user will be prompted for a  terminal
  1220. type,  then  dropped  into  userreg.    Or  they  may press the ``Click here to
  1221. register for an account'' button on our current  login  screen,  which  runs  a
  1222. script  to  start userreg in an xterm.  In a previous configuration clicking on
  1223. that button logged the user in as register for a workstation session instead of
  1224. a  tty-based  session,  requiring  another  script.    These  will  have  to be
  1225. customized for your workstation configuration.
  1226.  
  1227. When userreg is started, it checks a file called disabled.times to determine if
  1228. anyone  is  allowed  to  register  right now.  This file contains crontab-style
  1229. lines specifying times when registration is not  allowed  and  the  appropriate
  1230. message to display at those times.  For example, the file:
  1231.     * 23 * * *      nightly database propagation is in progress.
  1232.     0-29 0 * * *    nightly database propagation is in progress.
  1233.     * 4 * * 7       weekly database maintenance is in progress.
  1234.  
  1235. Would  disallow  registration  from  11:00pm  to 12:29am each evening, and from
  1236. 4:00am to 4:59am on Sunday mornings.  Do not put in a line with  all  asterisks
  1237. to match all times, as this will confuse the algorithm userreg uses to tell the
  1238. user when the next time is that registration will be allowed.   It  is  a  good
  1239. idea  to  disable  registration this way whenever taking down the reg_svr since
  1240. otherwise users will not get an informative  message  as  to  why  they  cannot
  1241. register  (they  will  simply  be  told  that  ``part of the computer system is
  1242. down'').
  1243.  
  1244. The userreg program enforces the same capitalization rules  as  the  bulk  load
  1245. programs (described on page 3).  Even though the name may occasionally not look
  1246. right on the screen, that should be the way it is  recorded  on  the  database.
  1247. The first name, last name, and ID number must all match what is in the database
  1248. before the user will be found.
  1249.  
  1250. The suggested username is a concatenation of the first initial, middle initial,
  1251. and  first  six characters of the last name.  However, users are free to choose
  1252. any username that begins with a lowercase  letter,  is  followed  by  lowercase
  1253. letters,  numerals,  or underscore, and is from three to eight characters long.
  1254. Userreg first checks to see if the proposed username  is  in  use  in  kerberos
  1255. before  querying moira (since the kerberos lookup is much faster).  If you have
  1256. kerberos principals without corresponding accounts in  moira,  those  usernames
  1257. will still be reserved in moira.
  1258.  
  1259. Setting  the username in the database is the heart of the registration process,
  1260. as all other resources for the account are set at the same time.   The  reg_svr
  1261. simply  executes  a register_user query and reserves the principal in kerberos.
  1262. This query takes the following actions:
  1263.  
  1264.    1. The user must exist and have a status of 0 (not  registered),  or  6
  1265.       (enrolled but not registered).
  1266.  
  1267.    2. The new login name must not be in use as a login name, list name, or
  1268.       filesystem name.
  1269.  
  1270.    3. A location is chosen  for  the  user's  pobox,  and  this  pobox  is
  1271.       assigned.
  1272.  
  1273.    4. A ``group'' list is created with the same name as the user, which is
  1274.       an  active,  private,  visible  group  with  a  unique  GID.     The
  1275.       administrator  is  the  user  and  it has one member who is also the
  1276.       user.
  1277.  
  1278.    5. A partition is chosen for the user's home directory, and this locker
  1279.       is  then  created with the same name as the user, owned by the user,
  1280.       with locker type HOMEDIR.
  1281.  
  1282.    6. The default quota is assigned for the user on the locker.
  1283.  
  1284.    7. The user is left in state 2 (half-registered).
  1285.  
  1286. Only if all of these steps are successful will the new username be allowed.
  1287.  
  1288. The pobox is placed on the POP server with the most free space.  This is  found
  1289. by  scanning  the  server-host  tuples for each of the hosts supporting service
  1290. POP.  Value1 for a POP server indicates how many poboxes are assigned  to  this
  1291. server, and is maintained automatically by moira.  Value2 is the maximum number
  1292. of poboxes allowed on this server.  The POP server  is  chosen  which  has  the
  1293. largest difference between the maximum and the current usage.
  1294.  
  1295. The  home  directory  is  located  in a similar manner.  The NFS partitions are
  1296. scanned.  The use bits of each one are compared with the usertype  argument  to
  1297. register_user  (the  reg_svr  always  uses  type  1  (student)).   For each one
  1298. supporting the correct kind of user, the difference between the  size  and  the
  1299. allocated  quota  is  determined.    The  eligible  partition  with the largest
  1300. difference will be used.   The quota assigned is  the  value  of  ``def_quota''
  1301. stored in the moira values table.
  1302.  
  1303. When  this  step is completed, the user is half-registered.  They still have to
  1304. choose a password.  When they enter their password,  reg_svr  will  set  it  in
  1305. kerberos and update their status to 1 (active).  Their account is now complete,
  1306. and will be usable the next time moira updates the system services.
  1307.  
  1308.  
  1309.  
  1310. 5.2.3. General Cleanup
  1311. It is good to periodically check the database to see that things are in  order.
  1312. Things  to  check for include: users without poboxes, duplicates, users without
  1313. filesystems, obscure classes, etc.  Most of this is done directly in SQL.  Some
  1314. things,  like deleting users who never registered for their accounts and are no
  1315. longer eligible, are easy and should be done monthly when new tapes are loaded.
  1316. Other cleanup only needs to be done once a term or once a year.
  1317.  
  1318. To  delete  a  mass of users, simply use the interactive SQL commands to delete
  1319. the desired columns from the users table.  Then run dbck to  catch  and  remove
  1320. any  dangling references.  You will probably want to delete any filesystems and
  1321. lists with the same name as the deleted users.
  1322.  
  1323. [Athena] The procedure for deactivating accounts here at Athena is as  follows:
  1324.  
  1325.    1. For the first month of the academic year, we make a list of everyone
  1326.       who used the system by processing the kerberos logs.
  1327.  
  1328.    2. We load the latest tapes from the registrar and  personnel  offices,
  1329.       flagging which accounts were not on those tapes.
  1330.  
  1331.    3. Decide  which  values  in  the  class  field  of the user record are
  1332.       targets for removal.  Generally this is the  undergrads  who  should
  1333.       have  just  graduated,  grad students whom the registrar says aren't
  1334.       students anymore, and special accounts from the previous year.   All
  1335.       others are examined by hand.
  1336.  
  1337.    4. Accounts  which  are  targeted  for deletion and weren't used in the
  1338.       last month have their status set to 3.  This causes the  account  to
  1339.       no longer be usable, but it can easily be re-enabled by changing the
  1340.       status back to 1.
  1341.  
  1342.    5. Accounts which are targeted for deletion but are  still  being  used
  1343.       have  mail  sent  to them informing them that their accounts will be
  1344.       turned off in two weeks.  During this  time  they  can  appeal  this
  1345.       decision to the accounts consultants.
  1346.  
  1347.    6. After  the  two weeks, anyone who has not had their class changed to
  1348.       GUEST or otherwise been saved from the purge will have their  status
  1349.       set to 3.
  1350.  
  1351.    7. After  a couple of months, we migrate the home directories of all of
  1352.       the accounts in state 3 to one partition, make an archival  copy  of
  1353.       the  partition,  then  delete  their  filesystems.   It is no longer
  1354.       simple to reactivate their accounts.
  1355.  
  1356.    8. The following summer, we really delete them.  By waiting most  of  a
  1357.       year,  we  reserve  the  username and UID for that period of time to
  1358.       avoid confusion in email or file ownership.  At  deletion  time,  we
  1359.       use  raw  SQL  to  delete  any  user record in state 3 that has been
  1360.       unmodified for more than 6  months,  and  delete  the  corresponding
  1361.       lists.    The moira database consistency checker is run to catch any
  1362.       dangling references to these now-deleted accounts.
  1363.  
  1364. 5.3. Updates
  1365. Keeping tabs on the regular moira updates of system servers is one of the daily
  1366. duties  of  the moira system administrator.  Normally, everything works without
  1367. any intervention.  However, when errors do occur, the system will  not  attempt
  1368. any more updates for the failed service until the error is manually reset.
  1369.  
  1370. Updates  are  attempted whenever the data control manager, or dcm, is run.  The
  1371. dcm is normally invoked by cron.   You  may  configure  it  to  run  regularly,
  1372. perhaps  as often as every 15 minutes, or only run dcms at certain times of the
  1373. day.  [Athena] Because the database  is  read-locked  for  the  duration  of  a
  1374. service  update,  we  only  run updates at night.  This means that changes made
  1375. during the day are not visible until the following day.    We  invoke  the  dcm
  1376. hourly  between  11pm  and  5am.   Invoking it many times gives parallelism for
  1377. updates that take a long time and guarantees retries in the case  of  transient
  1378. failures.
  1379.  
  1380. Cron  actually  runs  startdcm , which is a program that launches the dcm after
  1381. connecting to the root directory and  setting  up  the  debugging  and  logging
  1382. correctly.    It  is  startdcm  which puts the timestamp on each line logged to
  1383. /moira/dcm.log.  It is not necessary to  use  startdcm;  it  is  a  convenience
  1384. program to avoid having to always have the proper environment to start the dcm.
  1385.  
  1386.  
  1387.  
  1388. 5.3.1. Services to be updated
  1389. For each service moira supports, the following information is kept:
  1390.  
  1391. name            Up to 16 characters long, case in-sensitive.
  1392.  
  1393. update interval The  minimum  amount  of  time between updates of this service.
  1394.                 Displayed as hh:mm:ss, but new  values  are  input  in  minutes
  1395.                 only.
  1396.  
  1397. target file     Where on each server to put the file generated.
  1398.  
  1399. script          Name  of the script file on the moira server to be sent over to
  1400.                 the server and executed during the  server  update.    [Athena]
  1401.                 This is usually /moira/bin/service.sh.
  1402.  
  1403. When last generated
  1404.                 This read-only field shows when data  files  for  this  service
  1405.                 were last generated.
  1406.  
  1407. When last checked
  1408.                 This read-only field shows  when  the  dcm  last  checked  this
  1409.                 service to see if it needed updating.
  1410.  
  1411. type            Service  type,  used  to determine how to deal with concurrency
  1412.                 and errors during the update.  [Athena] Types  are  UNIQUE  and
  1413.                 REPLICATED.
  1414.  
  1415. enable/disable  This  flag  indicates if the dcm should attempt updates of this
  1416.                 service.
  1417.  
  1418. idle/inprogress This  read-only  flag  indicates  if  the  dcm   is   currently
  1419.                 generating data files for this service.
  1420.  
  1421. hard error      no error
  1422.                 This flag indicates that this service had  an  error  the  last
  1423.                 time  an  update  was attempted.  It is set by the dcm, and may
  1424.                 only be cleared by the user.
  1425.  
  1426. error message   This field will contain the error if the  hard  error  flag  is
  1427.                 set.
  1428.  
  1429. access control  This field consists of a type and a name.  If the type is USER,
  1430.                 the name must be a login name.  If the type is LIST,  the  name
  1431.                 must name a list.  The type may be NONE, in which case the name
  1432.                 is ignored.  A user  on  the  access  control  list  may  reset
  1433.                 service errors and manipulate hosts supporting the service.
  1434.  
  1435. When  the  dcm runs, it scans the services, finding those which are enabled and
  1436. do not have hard errors, and more than  update  interval  minutes  have  passed
  1437. since  the  time  data files were last generated for this service.  For each of
  1438. these services, it will set  the  time  last  checked  to  now,  then  run  the
  1439. generator   for   that   service.      The   generator   for   service  foo  is
  1440. /moira/bin/foo.gen.  The generator may be successful, in which case  it  leaves
  1441. behind /moira/dcm/foo.out and sets the time last generated.  It may decide that
  1442. the database is unchanged and not regenerate the data files.  It may get a soft
  1443. error,  meaning that if the dcm tries again it may succeed.  It will record the
  1444. soft error in the error message field, but not set the hard error flag.  It may
  1445. get  a  hard  error,  in which case it sets the hard error flag and records the
  1446. error message.  While the dcm is working on a service, it obtains an  exclusive
  1447. lock  on that service so that another dcm running will not also attempt to work
  1448. on the same service.
  1449.  
  1450. Errors that occur during service updates are often caused by  the  machine  the
  1451. moira  server is running on running out of some resource, such as swap space or
  1452. maximum number of database locks.  These are not always caught  and  marked  as
  1453. soft  errors  because  they  often  cause the generator program to exit with an
  1454. unexpected status.  Also note that the error message recorded  with  a  failure
  1455. may  not  be  correct  as only the 8 least significant bits are passed from the
  1456. generator to the dcm, which must guess as to what range that code was  supposed
  1457. to  fall into.  If the cause of an error is not immediately apparent, check the
  1458. log file /moira/dcm.log.
  1459.  
  1460.  
  1461.  
  1462. 5.3.2. Hosts to be updated
  1463. For each host that supports a  given  service,  moira  contains  the  following
  1464. information:
  1465.  
  1466. service         Name  of  service  this host is supporting.  This field is case
  1467.                 insensitive.
  1468.  
  1469. host            Name of machine, which must already be known to moira.
  1470.  
  1471. success/failure This read-only flag indicates if the last attempted update  was
  1472.                 successful or not.
  1473.  
  1474. enable/disable  This  flag  indicates  if  updates should be attempted for this
  1475.                 host.
  1476.  
  1477. override/normal This indicates a priority on the  next  update.    Setting  the
  1478.                 override  flag causes a dcm to be started immediately, and this
  1479.                 service/host will updated even if the service interval has  not
  1480.                 yet  passed.    This  flag  may be set by the user, but is only
  1481.                 cleared by the dcm.
  1482.  
  1483. inprogress/idle This read-only flag indicates that an update is in progress  to
  1484.                 this host.
  1485.  
  1486. hard error/no error
  1487.                 This flag indicates that this host had an error the  last  time
  1488.                 an update was attempted.  It is set by the dcm, and may only be
  1489.                 cleared by the user.
  1490.  
  1491. error message   This field will contain the error if the  hard  error  flag  is
  1492.                 set.
  1493.  
  1494. last time tried This read-only field shows when the last update was attempted.
  1495.  
  1496. last time successful
  1497.                 This read-only field shows when the last successful update was.
  1498.  
  1499. value1          This integer field has a service-dependent value.
  1500.  
  1501. value2          This integer field has a service-dependent value.
  1502.  
  1503. value3          This 32 character string field has a service-dependent value.
  1504.  
  1505. As the dcm scans the services, it will also  scan  the  hosts  supporting  each
  1506. service  that  is enabled.  Before starting the host scan, if the service is of
  1507. type REPLICATED it gets a an exclusive lock on that service and  if  it  is  of
  1508. type  UNIQUE  it gets a shared lock.  After obtaining locks, it will check each
  1509. host supporting that service which is enabled, doesn't have a hard  error,  and
  1510. hasn't  been updated since the last time the data files were generated for this
  1511. service.  If the override flag is set, it will attempt the host even if it  has
  1512. been  updated  since  the data files were generated.  The dcm gets an exclusive
  1513. lock on that host, then attempts the update.
  1514.  
  1515. The update consists of sending over the file  /moira/dcm/service.out  from  the
  1516. moira  server machine to the target filename on the host, then sending over the
  1517. script to a temporary file and then executing the script.    If  a  soft  error
  1518. occurs, the error message will be recorded and everything else left so that the
  1519. next dcm pass will try again.  If a hard error occurs, the hard error flag will
  1520. be  set  as  well.    If the service is of type REPLICATED, the service will be
  1521. marked with a hard error as well so that no further updates will  be  attempted
  1522. of the replicated service.
  1523.  
  1524. Common  errors to be on the watch for include network failures, the hosts being
  1525. down, and the hosts running out of disk space to accept the update.  The  error
  1526. message  may explain what went wrong, but when in doubt check /moira/dcm.log on
  1527. the moira server machine.
  1528.  
  1529. In addition to controlling updates, hosts supporting services are  also  loaded
  1530. into  the nameserver with type sloc.  Thus querying hesiod for (nfs, sloc) will
  1531. return a list of the machines moira sends NFS updates to.  If you want  to  put
  1532. an  sloc  entry  into  the  nameserver  without actually doing updates for that
  1533. service, make an entry for the service which is disabled, then entries for each
  1534. of the hosts which are enabled.  Most of the information will be ignored during
  1535. updates, and the nameservice will get the correct info.
  1536.  
  1537. 5.4. Database Maintenance
  1538. Backups are a part of regular database maintenance.   If  your  system  changes
  1539. regularly, you should be doing daily backups of the moira database.  You may do
  1540. UNIX backups of the database partition, DBMS backups of the  database,  or  use
  1541. the  programs  provided  with moira.  The advantage to using the moira programs
  1542. mrbackup and mrrestore is that they save the database in an ASCII format  which
  1543. is  easy  to  work  with  and  independent  of  the  DBMS.  They also guarantee
  1544. consistency of the dump through the use of database transactions.
  1545.  
  1546. Mrbackup is simple to run, taking only one argument indicating a  directory  to
  1547. put  the  backup  in.    It will produce a file for each table in the database.
  1548. These files contain a line for each record, the lines  consisting  of  vertical
  1549. bar-separated fields.  [Athena] At Athena, we run mrbackup to another partition
  1550. on the moira server, and copy that backup over the net to two  other  machines.
  1551. The   backups   are   not   regularly   copied  to  tape,  partly  because  the
  1552. privacy-sensitive information in the  database  would  require  keeping  closer
  1553. control on those tapes than the regular user file backups.
  1554.  
  1555. In the event you ever need to restore a database, here are some instructions on
  1556. how to do that.
  1557.  
  1558.    1. SU to whatever user should own the database.
  1559.  
  1560.    2. Create an empty database named smstemp.
  1561.  
  1562.    3. Run the db/newdb script to create all of the tables in the database.
  1563.  
  1564.    4. Run  mrrestore,  giving  it  an  argument  of  the  directory   name
  1565.       containing the backup.
  1566.  
  1567.    5. Run the db/dbopt script to create all of the indexes on the tables.
  1568.  
  1569.    6. Run  the appropriate DBMS commands to set permissions on the tables.
  1570.       [Athena] For Ingres, this would be ``define permit all on  table  to
  1571.       root'' for each table.
  1572.  
  1573.    7. Skim  the journal file and enter any changes needed between the time
  1574.       of the last backup and when the database was lost.
  1575.  
  1576.  
  1577.  
  1578. 5.4.1. Granting Privileges
  1579. There are a number of ways that privileges can be granted in  moira.    At  the
  1580. lowest  level is the privilege of performing QUEL or SQL operations directly on
  1581. the database.  To grant this privilege in Ingres, go into quel  and  enter  the
  1582. command
  1583.  
  1584.     define permit all on table to user
  1585.  
  1586. for  each  of  the  tables  you  want  to allow user to have access.  Note that
  1587. newmoira will do this for you at the  time  you  originally  create  the  moira
  1588. database.
  1589.  
  1590. More  commonly,  you will be concerned with the privileges necessary to perform
  1591. moira queries through the clients.  Each of  the  130  queries  has  an  access
  1592. control  list  associated with it.  These lists are references to regular moira
  1593. lists which may  be  manipulated  with  the  regular  moira  list  tools  (e.g.
  1594. listmaint,  blanche, etc).  If a user is on the ACL for a query, he can perform
  1595. that query on any data in the database.  Many  queries  also  have  conditional
  1596. ACLs  based  on  the  object  of  the query.  For example, being on the ACL for
  1597. get_members_of_list will allow you to get the membership of any  list,  whereas
  1598. without being on that ACL you can still get the membership of any list of which
  1599. you are an administrator, or any list which is not hidden.
  1600.  
  1601. Some thought needs to be put into how you assign the query ACLs.  The  newmoira
  1602. program  sets  all  of  them to be the list dbadmin which it sets up to contain
  1603. each of the privileged users you name.  This gives the users on this  list  all
  1604. privileges,  and denies any privilege to other users.  Some queries are safe to
  1605. be executed by anyone, and there is a way to specify that: any list  containing
  1606. the  user  ``default''  is  considered  to  have  everyone  as a member for the
  1607. purposes of checking query ACLs.  [Athena] They queries we have set up this way
  1608. are:
  1609.  
  1610.    - get_alias
  1611.    - get_list_is_group
  1612.    - get_list_is_maillist
  1613.    - get_server_host_info
  1614.    - get_server_info
  1615.    - get_server_locations
  1616.    - get_value
  1617.    - qualified_get_server_host
  1618.    - qualified_get_server
  1619.  
  1620. Many  queries  you  may want to set up with a larger ACL than just the database
  1621. administrators, but without everybody.  Because these are a little difficult to
  1622. change,  have  a  rational  plan  in  mind for setting up ACLs rather than just
  1623. assigning them as they are needed.  If you want to continue having  the  people
  1624. on  dbadmin  have  full  privileges,  then you will have to make sure that LIST
  1625. dbadmin is a member of each ACL that you change.
  1626.  
  1627. To set a query ACL:
  1628.  
  1629.    1. Create a list to be the ACL,  or  choose  an  existing  list.    For
  1630.       example, ``user-accts''.
  1631.  
  1632.    2. Go into quel on the moira server
  1633.  
  1634.           quel sms
  1635.  
  1636.    3. Find the list_id of the list:
  1637.  
  1638.           range of l is list
  1639.           retrieve (l.list_id) where l.name="user-accts"
  1640.  
  1641.    4. Update the ACL:
  1642.  
  1643.           range of c is capacls
  1644.           replace c (list_id=1837) where
  1645.                   c.capability="get_user_by_login"
  1646.  
  1647.    5. Kill and restart the moirad so the change will actually take effect
  1648.  
  1649.  
  1650.  
  1651. 5.4.2. ID Number Allocation
  1652. Moira  handles  a number of different kinds of ID numbers, both for its own use
  1653. internally and externally visible ones like UIDs and GIDs.  There  are  entries
  1654. in  the  values  table  for  each  ID  number  indicating the next number to be
  1655. allocated.  When moira needs another number, it reads the current value out  of
  1656. the  values  table,  and  checks  to  see  if  that  ID  is in use.  If not, it
  1657. increments the value stored in the values table and uses the  old  value.    If
  1658. that value was already in use, it increments the value and checks the next one.
  1659. Each time it increments the value, it compares it with the maximum  ID,  32765.
  1660. If it has reached this, it sets the value to 100 and continues from there.
  1661.  
  1662. This  is  usually  fast to assign ID numbers.  However, if the assignment value
  1663. has wrapped and it must do many unsuccessful checks before it finds a number to
  1664. use,  this  may take a while.  You may set the value in the values table if you
  1665. want to change the range that ID numbers are being assigned in.
  1666.  
  1667.  
  1668.  
  1669. 5.4.3. Type Allocation
  1670. A number of the fields in the database are type-checked against a list of legal
  1671. values  also  stored  in  the database.  These are stored in the alias table as
  1672. aliases of type TYPE.  The moira client will automatically assign new values if
  1673. the  user  insists that he really wants to add a new legal value.  The database
  1674. administrator may occasionally want to clean up the values and delete  ones  no
  1675. longer in use.  This is done by scanning the output of the query
  1676.  
  1677.     get_alias * TYPE *
  1678.  
  1679. and deleting any aliases that shouldn't be there.
  1680. Index
  1681.  
  1682.           Access   5
  1683.           Access Control Entity   3
  1684.           ACE   3
  1685.           Active list   3
  1686.           Address   1
  1687.           Administrator   3
  1688.           AFS   4, 6
  1689.           AFS filesystems   5
  1690.           Auto create   5
  1691.  
  1692.           Backups   8
  1693.           Blanche   2
  1694.  
  1695.           Chfn   1
  1696.           Chpobox   1
  1697.           Class   2, 3
  1698.           Cluster   4
  1699.           Cluster information   4
  1700.  
  1701.           Data control manager   7
  1702.           Dcm   7
  1703.           Disabled.times   6
  1704.  
  1705.           Employee   6
  1706.           Enroll   2
  1707.           ERR filesystems   5
  1708.  
  1709.           File system groups   5
  1710.           Filesystem   5
  1711.           Filesystem alias   5
  1712.           Finger   1
  1713.           Fsgroup   5
  1714.  
  1715.           GID   3
  1716.           Group   3
  1717.           Group quotas   5
  1718.  
  1719.           Hidden list   3
  1720.           Home directory   7
  1721.           Host   4
  1722.           Hostname   4
  1723.  
  1724.           ID number   2, 3
  1725.           ID Numbers   9
  1726.           Inactive list   3
  1727.  
  1728.           Kerberos   3, 4
  1729.           Krbmap   3
  1730.  
  1731.           List   3
  1732.           Listmaint   2
  1733.           Locker   5
  1734.           Locker type   5
  1735.           Login name   2, 7
  1736.  
  1737.           Machine   4
  1738.           Mail forwarding   1
  1739.           Mailing list   3, 4
  1740.           Mailing lists   1
  1741.           Mailmaint   1
  1742.           Member   4
  1743.           Modification   1
  1744.           Moirad   6
  1745.           Mrbackup   8
  1746.           Mrrestore   8
  1747.  
  1748.           Name   1, 2
  1749.           Names   1
  1750.           NFS   5, 6
  1751.           NFS filesystems   5
  1752.  
  1753.           Owner   5
  1754.  
  1755.           Packname   5
  1756.           Partition   5
  1757.           Phone number   1
  1758.           Pobox   4, 7
  1759.           Post office box   1
  1760.           Private list   3
  1761.           Privileges   8
  1762.           Public list   3
  1763.           Public mailing lists   2
  1764.  
  1765.           Quota   7
  1766.  
  1767.           References   1
  1768.           Register   2, 6
  1769.           Registration   5
  1770.           Regtape   6
  1771.           Reg_svr   6
  1772.           Rename   4
  1773.           RVD filesystems   5
  1774.  
  1775.           Service   7
  1776.           Service location   8
  1777.           Sloc   8
  1778.           Startdcm   7
  1779.           Startmoira   6
  1780.           Status   2
  1781.           String   4
  1782.           Students   6
  1783.  
  1784.           Types   9
  1785.  
  1786.           UID   2
  1787.           Updates   7
  1788.           User accounts   2, 6
  1789.           Userreg   6
  1790.  
  1791.           Visible list   3
  1792.  
  1793.           Wildcards   4
  1794.  
  1795.           Xusers   6
  1796. Table of Contents
  1797.  
  1798. 1. Moira Overview                                                             1
  1799.  
  1800.    1.1. Moira Objects                                                         1
  1801.  
  1802. 2. Regular Users                                                              1
  1803.  
  1804.    2.1. Name, Address, Phone Number                                           1
  1805.    2.2. Receiving Mail                                                        1
  1806.    2.3. Mailing Lists                                                         1
  1807.        2.3.1. For More Sophisticated Users                                    2
  1808.  
  1809. 3. User Accounts Administrator                                                2
  1810.  
  1811.    3.1. User Accounts                                                         2
  1812.        3.1.1. Looking Up Users                                                2
  1813.        3.1.2. Adding New Users                                                2
  1814.        3.1.3. Making a User Account                                           3
  1815.        3.1.4. Changing User Information                                       3
  1816.        3.1.5. Removing Users                                                  3
  1817.    3.2. Lists                                                                 3
  1818.        3.2.1. Creating & Modifying Lists                                      3
  1819.        3.2.2. Membership                                                      4
  1820.    3.3. Mail Forwarding                                                       4
  1821.  
  1822. 4. Operations Staff                                                           4
  1823.  
  1824.    4.1. Managing Workstation Information                                      4
  1825.        4.1.1. Adding a New Cluster                                            4
  1826.        4.1.2. Adding a Machine                                                4
  1827.        4.1.3. Changing Cluster Information                                    4
  1828.        4.1.4. Changing Machine Information                                    4
  1829.            4.1.4.1. Changing the name of a machine                            4
  1830.        4.1.5. Deleting a Cluster                                              5
  1831.        4.1.6. Deleting a Machine                                              5
  1832.    4.2. Managing Filesystem Information                                       5
  1833.        4.2.1. Lockers                                                         5
  1834.        4.2.2. NFS Partitions                                                  5
  1835.        4.2.3. Adding a Filesystem                                             5
  1836.        4.2.4. Changing a Filesystem                                           5
  1837.        4.2.5. Deleting a Filesystem                                           6
  1838.        4.2.6. Quotas                                                          6
  1839.    4.3. Managing Printer Information                                          6
  1840.  
  1841. 5. Moira System Manager                                                       6
  1842.  
  1843.    5.1. The Server Process                                                    6
  1844.        5.1.1. Starting Moirad                                                 6
  1845.        5.1.2. Shutting Down the Server                                        6
  1846.    5.2. Accounts                                                              6
  1847.        5.2.1. User Account Tapes                                              6
  1848.        5.2.2. Register                                                        6
  1849.        5.2.3. General Cleanup                                                 7
  1850.    5.3. Updates                                                               7
  1851.        5.3.1. Services to be updated                                          7
  1852.        5.3.2. Hosts to be updated                                             8
  1853.    5.4. Database Maintenance                                                  8
  1854.        5.4.1. Granting Privileges                                             8
  1855.        5.4.2. ID Number Allocation                                            9
  1856.        5.4.3. Type Allocation                                                 9
  1857.  
  1858. Index                                                                        10
  1859.